<?php
require_once("class.ezpdf.php");
$pdf =& new Cezpdf();
$pdf->selectFont('fonts/Helvetica.afm');

//
$dblink = getconn();
$results = "";
$stmt = "select itemid,name from gst";
$result = mysqli_query($dblink,$stmt);
if ($result) {
 while($row = mysqli_fetch_array($result,MYSQLI_ASSOC)){
  $results[]=$row;
 }
}
$data = $results;
mysqli_close($dblink);
//
$title = "";
//$opts['cols'] = array('rate'=>array('justification'=>'right','width'=>'200'));
//$opts['innerLineThickness'] = 0.5 ;
//$opts['outerLineThickness'] = 0.5 ;
$opts = array('shaded'=>0);$opts['showHeadings'] = 0;
$opts['yPos'] = 400; $opts['xPos'] = 200;
$opts['fontSize'] = 11; $opts['showLines'] = 0;

$data = array(array('a'=>"Multiple linesa\nPlaced on the page"));
$pdf->ezTable($data,'',$title,$opts);

$pdf->addJpegFromFile('COLDHOT2.JPG',150,650,100);
$data = array(array('aaa'=>"Is this a\nmulti line problem"));
//print "<pre>";
//print_r($data);
$pdf->ezTable($data,'',$title,$opts);

$pdf->ezSetY(300);
$pdfcode = $pdf->ezOutput();
$fp=fopen('findthis.pdf','wb');
fwrite($fp,$pdfcode);
fclose($fp);
$pdf->ezStream();
?>